<template>
  <div className="home" ref="home">
    数据报表
  </div>
</template>

<script setup>
import {onMounted, reactive, ref} from "vue";
import * as echarts from "echarts"
import request from "../request.js";

let myChart = ref(null)
let home = ref(null)
const state = reactive({
  dataList: {},
  outPut: [],
  cart: {}
})
let goodsName = reactive([])
let nums = reactive([])
onMounted(async () => {
  myChart.value = echarts.init(home.value)
  myChart.value.setOption(
      {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          // '收入', '花销'
          data: ['日志量', '同期比较']
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        toolbox: {
          feature: {
            saveAsImage: {}
          }
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            name: '日志量',
            type: 'line',
            stack: 'Total',
            data: [120, 132, 101, 134, 90, 230, 210]
          },
          {
            name: '同期比较',
            type: 'line',
            stack: 'Total',
            data: [220, 182, 191, 234, 290, 330, 310]
          }
        ]
      }
  )

})
</script>

<style scoped lang="scss">
.home {
  height: 380px;
}

</style>